//
//  ZHArrayTool.m
//  Doctor
//
//  Created by liuzhishan on 15/12/25.
//  Copyright © 2015年 shanshan. All rights reserved.
//

#import "ZHArrayTool.h"

@implementation ZHArrayTool

+(CGFloat)getTheMinInDataArray:(NSArray *)array
{
 
    CGFloat min = MAXFLOAT;
    
    for (NSNumber *obj  in array) {
        
        CGFloat temp = [obj floatValue];
        
        if (temp < min) {
            
            min = temp;
        }
        
    }
    
    
    return min;
    
    
}


+(CGFloat)getTheMaxInDataArray:(NSArray *)array
{
    
    CGFloat max = NSIntegerMin;
    
    for (NSNumber *obj  in array) {
        
        CGFloat temp = [obj floatValue];
        
        if (temp > max) {
            
            max = temp;
        }
        
    }
    
    
    return max;
   
    
    
}



@end
